#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
import os

# 读取README文件
def read_readme():
    with open("README.md", "r", encoding="utf-8") as f:
        return f.read()

# 读取版本信息
def read_version():
    try:
        with open("hik_camera/__init__.py", "r", encoding="utf-8") as f:
            content = f.read()
            for line in content.split('\n'):
                if line.startswith('__version__'):
                    return line.split('=')[1].strip().strip('"').strip("'")
    except:
        pass
    return "1.0.0"

setup(
    name="hik_camera",
    version=read_version(),
    author="liuhaoya20",
    author_email="",
    description="海康威视相机控制Python库 / HikVision Camera Control Python Library",
    long_description=read_readme(),
    long_description_content_type="text/markdown",
    url="https://gitee.com/liuhaoya20/hik_camera",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera",
    ],
    python_requires=">=3.6",
    install_requires=[
        "numpy>=1.19.0",
    ],
    keywords="hikvision camera control opencv computer-vision",
    project_urls={
        "Bug Reports": "https://gitee.com/liuhaoya20/hik_camera/issues",
        "Source": "https://gitee.com/liuhaoya20/hik_camera",
        "Documentation": "https://gitee.com/liuhaoya20/hik_camera",
    },
    package_data={
        "hik_camera": ["MvImport/*.py"],
    },
    include_package_data=True,
    zip_safe=False,
)
